package com.ruoyi.yyq.api.factory;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.yyq.api.RemoteCarRepairReservationService;
import com.ruoyi.yyq.api.domain.CarRepairReservation;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class RemoteCarRepairReservationFallbackFactory implements FallbackFactory<RemoteCarRepairReservationService> {
	private static final Logger log = LoggerFactory.getLogger(RemoteCarRepairReservationFallbackFactory.class);
	@Override
	public RemoteCarRepairReservationService create(Throwable cause) {
		log.error("预约服务调用失败:{}", cause.getMessage());
		return new RemoteCarRepairReservationService(){

			@Override
			public TableDataInfo getlist(String source, CarRepairReservation carRepairReservation) {
				return null;
			}

			@Override
			public AjaxResult getAdd(String source, CarRepairReservation carRepairReservation) {
				return null;
			}

			@Override
			public AjaxResult getEdit(String source, CarRepairReservation carRepairReservation) {
				return null;
			}

			@Override
			public AjaxResult getRemove(String source, Long[] ids) {
				return null;
			}
		};
	}
}
